<?php

declare (strict_types=1);

namespace app\platform\validate;

use think\Validate;

class Role extends Validate
{
    protected $rule = [
        'name'   => 'require',
        'status' => ['require', 'in' => '1,2'],
    ];

    protected $message = [
        'name.name'   => '请输入角色名称',
        'status' => '请选择正确的状态',
    ];

    protected $scene = [
        'add'  => ['name', 'status'],
        'edit' => ['name', 'status']
    ];
}
